/* 
 * File:   StockPublisherService.hpp
 * Author: bag
 *
 * Created on December 15, 2011, 12:02 AM
 */

#ifndef STOCKPUBLISHERSERVICE_HPP
#define	STOCKPUBLISHERSERVICE_HPP

#include "stdafx.hpp"
#include "DBAccess.hpp"
#include "XMLextractor.hpp"
#include "Server.hpp"

namespace bagprod { namespace finance { namespace SPS {

class StockPublisherService
{
private:
    std::map<std::string, std::list<types::StockData *> > m_StockDataMap;
    std::map<std::string, types::Stock*> m_TickerStockMap;
    DBAccess *m_databaseAccess;
    XMLextractor *m_xmlExtractor;
    Server *m_server;
    
    void CreateDataCaches();
    void LoadXMLConfiguration();
public:
    StockPublisherService();
    ~StockPublisherService();
    void Initalize(int argc, char* argv[]);
    void Start();
    void Stop();
};

}}} // Namespace

#endif	/* STOCKPUBLISHERSERVICE_HPP */

